.class public Lcom/nemustech/regina/PanelMaker;
.super Ljava/lang/Object;
.source "PanelMaker.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "PanelMaker"

.field private static mInstance:Lcom/nemustech/regina/PanelMaker;


# instance fields
.field private mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

.field private mWorld:Lcom/nemustech/tiffany/world/TFWorld;


# direct methods
.method private constructor <init>(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/tiffany/world/TFWorld;)V
    .locals 0
    .parameter "reginaLauncher"
    .parameter "world"

    .prologue
    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 18
    iput-object p1, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    .line 19
    iput-object p2, p0, Lcom/nemustech/regina/PanelMaker;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    .line 20
    return-void
.end method

.method public static createPanelMaker(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/tiffany/world/TFWorld;)V
    .locals 1
    .parameter "reginaLauncher"
    .parameter "world"

    .prologue
    .line 23
    new-instance v0, Lcom/nemustech/regina/PanelMaker;

    invoke-direct {v0, p0, p1}, Lcom/nemustech/regina/PanelMaker;-><init>(Lcom/nemustech/regina/ReginaLauncher;Lcom/nemustech/tiffany/world/TFWorld;)V

    sput-object v0, Lcom/nemustech/regina/PanelMaker;->mInstance:Lcom/nemustech/regina/PanelMaker;

    .line 24
    return-void
.end method

.method public static getInstance()Lcom/nemustech/regina/PanelMaker;
    .locals 2

    .prologue
    .line 27
    sget-object v0, Lcom/nemustech/regina/PanelMaker;->mInstance:Lcom/nemustech/regina/PanelMaker;

    if-eqz v0, :cond_0

    .line 28
    sget-object v0, Lcom/nemustech/regina/PanelMaker;->mInstance:Lcom/nemustech/regina/PanelMaker;

    .line 31
    :goto_0
    return-object v0

    .line 30
    :cond_0
    const-string v0, "PanelMaker"

    const-string v1, "Panel Maker Not Create"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 31
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public createCustomPanel(II)Lcom/nemustech/tiffany/world/TFCustomPanel;
    .locals 3
    .parameter "width"
    .parameter "height"

    .prologue
    .line 43
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p1}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v1

    .line 44
    .local v1, panelWidth:F
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p2}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v0

    .line 46
    .local v0, panelHeight:F
    new-instance v2, Lcom/nemustech/tiffany/world/TFCustomPanel;

    invoke-direct {v2, v1, v0}, Lcom/nemustech/tiffany/world/TFCustomPanel;-><init>(FF)V

    return-object v2
.end method

.method public createPanel(II)Lcom/nemustech/tiffany/world/TFPanel;
    .locals 3
    .parameter "width"
    .parameter "height"

    .prologue
    .line 36
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p1}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v1

    .line 37
    .local v1, panelWidth:F
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p2}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v0

    .line 39
    .local v0, panelHeight:F
    new-instance v2, Lcom/nemustech/tiffany/world/TFPanel;

    invoke-direct {v2, v1, v0}, Lcom/nemustech/tiffany/world/TFPanel;-><init>(FF)V

    return-object v2
.end method

.method public morphPanelSize(Lcom/nemustech/tiffany/world/TFPanel;IIJ)V
    .locals 3
    .parameter "panel"
    .parameter "width"
    .parameter "height"
    .parameter "animationTime"

    .prologue
    .line 51
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p2}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v1

    .line 52
    .local v1, panelWidth:F
    iget-object v2, p0, Lcom/nemustech/regina/PanelMaker;->mReginaLauncher:Lcom/nemustech/regina/ReginaLauncher;

    invoke-static {v2, p3}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v0

    .line 54
    .local v0, panelHeight:F
    invoke-virtual {p1, v1, v0, p4, p5}, Lcom/nemustech/tiffany/world/TFPanel;->morph(FFJ)V

    .line 55
    return-void
.end method
